package com.practice.system.controller;

import com.practice.system.pojo.PlanningScheduling;
import com.practice.system.service.PlanningSchedulingService;
import com.practice.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.text.ParseException;
import java.util.Map;

@RestController
@RequestMapping("/planningscheduling")
public class PlanningSchedulingController {
    @Autowired
    PlanningSchedulingService planningSchedulingService;
    @PostMapping("/list")
    public R list(@RequestBody Map<String,Object> params){
        return planningSchedulingService.list(params);
    }

    @PostMapping("/update")
    public R update(@RequestBody PlanningScheduling updateValue) {
        return planningSchedulingService.update(updateValue);
    }
    @PostMapping("/add")
    public R add(@RequestBody PlanningScheduling planningScheduling){
        return planningSchedulingService.add(planningScheduling);
    }

    @GetMapping("/planningscheduling/{id}")
    public R delete(@PathVariable("id") String id){
        return planningSchedulingService.delete(id);
    }
}
